<script setup>
import {ref, watch} from "vue";
// import * as fs from 'node:fs';

let count = ref(0);

watch(count,(newVal, oldVal)=>{
  console.log(newVal, oldVal);
})

setTimeout(()=>{
  count.value +=1 ;
},2000)
</script>

<template>
  <div ref="elem">06_composition_api_watch_watcheffect_02.vue
    {{count}}
  </div>
</template>

<style scoped>

</style>